﻿#include "mealbuilder.h"

#include <QtGlobal>

#include "meal.h"

MealBuilder::MealBuilder()
{
    m_meal = Q_NULLPTR;
}

void MealBuilder::buildDrink()
{
    if (m_meal == Q_NULLPTR)
        m_meal = new Meal();
}

void MealBuilder::buildFood()
{
    if (m_meal == Q_NULLPTR)
        m_meal = new Meal();
}

Meal *MealBuilder::getMeal()
{
    Meal* rMeal = m_meal;
    m_meal = Q_NULLPTR;
    return rMeal;
}
